Envisat product¶
Envisat product stage-in example.
Import the Python packages¶
[2]:
import os
import cioppy
ciop = cioppy.Cioppy()
Stage-in two ASA_IMS_1P products over L’Aquila¶
[9]:
data_path = os.path.join(os.sep,'workspace','tmp','data')
if not os.path.isdir(data_path):
os.makedirs(data_path)
[10]:
master = 'https://catalog.terradue.com//envisat/search?uid=ASA_IMS_1PNDPA20080326_204749_000000162067_00129_31746_3124.N1'
slave = 'https://catalog.terradue.com//envisat/search?uid=ASA_IMS_1PNDPA20090311_204746_000000162077_00129_36756_3125.N1'
master = 'https://catalog.terradue.com//envisat/search?uid=ASA_IMS_1PNPDE20090412_092427_000000162078_00079_37207_1530.N1'
slave = 'https://catalog.terradue.com//envisat/search?uid=ASA_IMS_1PNUPA20090201_092428_000000162076_00079_36205_2699.N1'
enclosures = []
search_params = dict([('do', 'terradue')])
for product in [master, slave]:
search = ciop.search(end_point = product,
params = search_params,
output_fields='enclosure',
model='GeoTime')
enclosures.append(search[0]['enclosure'])
[11]:
enclosures
[11]:
['https://store.terradue.com/download/envisat/files/v1/ASA_IMS_1PNPDE20090412_092427_000000162078_00079_37207_1530.N1',
'https://store.terradue.com/download/envisat/files/v1/ASA_IMS_1PNUPA20090201_092428_000000162076_00079_36205_2699.N1']
[12]:
for enclosure in enclosures:
retrieved = ciop.copy(enclosure, data_path)
print retrieved
/workspace/tmp/data/ASA_IMS_1PNPDE20090412_092427_000000162078_00079_37207_1530.N1
/workspace/tmp/data/ASA_IMS_1PNUPA20090201_092428_000000162076_00079_36205_2699.N1